<!--  -->
<template>
  <div>
   {{counts }}
   <button @click="update">修改</button>
  </div>
</template>

<script lang='ts' setup>
import { reactive,toRefs,ref,onMounted} from 'vue'
import {storeToRefs} from 'pinia'
import {useNewsStore} from '../store/news';

const newsStore=useNewsStore();
const {counts}=storeToRefs(newsStore);
const update=()=>{

    counts.value=1000;

    // newsStore.updateCounts();
}

</script>
<style scoped>
</style>